package com.zzx.boot.emus;

import com.zzx.boot.message.ChitchatMessage;
import com.zzx.boot.message.ConnectMessage;
import com.zzx.boot.message.Message;

public enum ChatTypes {
    CONNECT("CONNECT", ConnectMessage.class),//连接消息
    CHITCHAT("CHITCHAT", ChitchatMessage.class);// 一对一

    // 群聊
    private String type;
    private Class<? extends Message> message;
     ChatTypes(String type, Class<? extends Message> message){
        this.type = type;
        this.message = message;
    }

    public Class<? extends Message> getMessage() {
        return message;
    }

    public String getType() {
        return type;
    }
}
